﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/BaseInfoMaster.master"
    CodeFile="EditConsumerMDay.aspx.cs" Inherits="EditConsumerMDay" CodeFileBaseClass="Frame.Pages.BaseInfomationEditBasePage" %>

<%@ Register Assembly="DevExpress.Web.ASPxGridView.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v10.2.Linq, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Data.Linq" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxRoundPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxPanel" TagPrefix="dx" %>
<asp:Content ID="headContent" ContentPlaceHolderID="head" runat="server">
    <link type="text/css" rel="stylesheet" href="../Content/Site.css" />
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <h1 class="DemoTitle">
        客户[<%= (Frame.Pages.RefrenceContext<DAL.BI_Consumer>.Current==null ? string.Empty:Frame.Pages.RefrenceContext<DAL.BI_Consumer>.Current.Model.CName)%>]纪念日信息管理
        <asp:HyperLink ID="Backlink" runat="server" Text="返回"></asp:HyperLink>
    </h1>
    <div id="DemoArea">
        <div class="Spacer" style="height: 14px;">
        </div>
        <dx:ASPxRoundPanel ID="Detailpanel" runat="server" Width="500px" HeaderText="客户基本信息"
            Font-Size="10pt" CssFilePath="~/App_Themes/DevEx/{0}/styles.css" CssPostfix="DevEx"
            EnableDefaultAppearance="False" GroupBoxCaptionOffsetX="6px" GroupBoxCaptionOffsetY="-19px"
            SpriteCssFilePath="~/App_Themes/DevEx/{0}/sprite.css">
            <ContentPaddings PaddingBottom="10px" PaddingLeft="7px" PaddingRight="11px" PaddingTop="10px" />
            <HeaderStyle>
                <Paddings PaddingBottom="6px" PaddingLeft="7px" PaddingRight="11px" PaddingTop="1px" />
            </HeaderStyle>
            <PanelCollection>
                <dx:PanelContent runat="server" SupportsDisabledAttribute="True">
                    <table width="100%" style="font-size: 10pt">
                        <tr>
                            <td style="white-space: nowrap">
                                客户姓名:
                            </td>
                            <td>
                                <dx:ASPxLabel Width="200px" ID="View_CName" Wrap="true" runat="server" CssFilePath="~/App_Themes/DevEx/{0}/styles.css"
                                    CssPostfix="DevEx">
                                </dx:ASPxLabel>
                            </td>
                            <td style="white-space: nowrap">
                                手机号:
                            </td>
                            <td>
                                <dx:ASPxLabel Width="200px" ID="View_PhoneNum" Wrap="true" runat="server" CssFilePath="~/App_Themes/DevEx/{0}/styles.css"
                                    CssPostfix="DevEx">
                                </dx:ASPxLabel>
                            </td>
                        </tr>
                        <tr>
                            <td style="white-space: nowrap">
                                部门:
                            </td>
                            <td>
                                <dx:ASPxLabel Width="200px" ID="View_Department" Wrap="true" runat="server" CssFilePath="~/App_Themes/DevEx/{0}/styles.css"
                                    CssPostfix="DevEx">
                                </dx:ASPxLabel>
                            </td>
                            <td style="white-space: nowrap">
                                性别:
                            </td>
                            <td>
                                <dx:ASPxLabel Width="200px" ID="View_Sex" Wrap="true" runat="server" CssFilePath="~/App_Themes/DevEx/{0}/styles.css"
                                    CssPostfix="DevEx">
                                </dx:ASPxLabel>
                            </td>
                        </tr>
                        <tr>
                            <td style="white-space: nowrap">
                                车牌/车名/颜色:
                            </td>
                            <td>
                                <dx:ASPxLabel Width="200px" ID="View_Car" Wrap="true" runat="server" CssFilePath="~/App_Themes/DevEx/{0}/styles.css"
                                    CssPostfix="DevEx">
                                </dx:ASPxLabel>
                            </td>
                            <td style="white-space: nowrap">
                                重要客户:
                            </td>
                            <td>
                                <dx:ASPxLabel Width="200px" ID="View_IsVip" Wrap="true" runat="server" CssFilePath="~/App_Themes/DevEx/{0}/styles.css"
                                    CssPostfix="DevEx">
                                </dx:ASPxLabel>
                            </td>
                        </tr>
                        <tr>
                            <td style="white-space: nowrap">
                                关联单位:
                            </td>
                            <td>
                                <dx:ASPxLabel Width="200px" ID="View_RefrenceCompany_ID" Wrap="true" runat="server"
                                    CssFilePath="~/App_Themes/DevEx/{0}/styles.css" CssPostfix="DevEx">
                                </dx:ASPxLabel>
                            </td>
                            <td style="white-space: nowrap">
                                职位，头衔:
                            </td>
                            <td>
                                <dx:ASPxLabel Width="200px" ID="View_Position" Wrap="true" runat="server" CssFilePath="~/App_Themes/DevEx/{0}/styles.css"
                                    CssPostfix="DevEx">
                                </dx:ASPxLabel>
                            </td>
                        </tr>
                        <tr>
                            <td style="white-space: nowrap">
                                单位名称:
                            </td>
                            <td colspan="3">
                                <dx:ASPxLabel Width="400px" ID="View_Company" Wrap="true" runat="server" CssFilePath="~/App_Themes/DevEx/{0}/styles.css"
                                    CssPostfix="DevEx">
                                </dx:ASPxLabel>
                            </td>
                        </tr>
                        <tr>
                            <td style="white-space: nowrap">
                                地址:
                            </td>
                            <td colspan="3">
                                <dx:ASPxLabel Width="400px" ID="View_Address" Wrap="true" runat="server" CssFilePath="~/App_Themes/DevEx/{0}/styles.css"
                                    CssPostfix="DevEx">
                                </dx:ASPxLabel>
                            </td>
                        </tr>
                        <tr>
                            <td style="white-space: nowrap">
                                喜好，口味:
                            </td>
                            <td colspan="3">
                                <dx:ASPxLabel Width="400px" ID="View_Favor" Wrap="true" runat="server" CssFilePath="~/App_Themes/DevEx/{0}/styles.css"
                                    CssPostfix="DevEx">
                                </dx:ASPxLabel>
                            </td>
                        </tr>
                        <tr>
                            <td style="white-space: nowrap">
                                备注:
                            </td>
                            <td colspan="3">
                                <dx:ASPxLabel Width="400px" ID="View_Remark" Wrap="true" runat="server" CssFilePath="~/App_Themes/DevEx/{0}/styles.css"
                                    CssPostfix="DevEx">
                                </dx:ASPxLabel>
                            </td>
                        </tr>
                    </table>
                </dx:PanelContent>
            </PanelCollection>
        </dx:ASPxRoundPanel>
        <div class="Spacer" style="height: 14px;">
        </div>
        <dx:ASPxGridView ID="gridView" runat="server" Width="100%" AutoGenerateColumns="False"
            CssFilePath="~/App_Themes/DevEx/{0}/styles.css" CssPostfix="DevEx" DataSourceID="LSMDSourceMain"
            KeyFieldName="MDayID" OnRowInserting="gridView_RowInserting">
            <Styles CssFilePath="~/App_Themes/DevEx/{0}/styles.css" CssPostfix="DevEx">
                <Header ImageSpacing="5px" SortingImageSpacing="5px">
                </Header>
                <LoadingPanel ImageSpacing="5px">
                </LoadingPanel>
            </Styles>
            <ImagesFilterControl>
                <LoadingPanel Url="~/App_Themes/DevEx/GridView/Loading.gif">
                </LoadingPanel>
            </ImagesFilterControl>
            <Images SpriteCssFilePath="~/App_Themes/DevEx/{0}/sprite.css">
                <LoadingPanelOnStatusBar Url="~/App_Themes/DevEx/GridView/StatusBarLoading.gif">
                </LoadingPanelOnStatusBar>
                <LoadingPanel Url="~/App_Themes/DevEx/GridView/Loading.gif">
                </LoadingPanel>
            </Images>
            <Columns>
                <dx:GridViewDataTextColumn Name="t_Consumer_ID" FieldName="Consumer_ID" VisibleIndex="0"
                    Visible="false" CellStyle-HorizontalAlign="Center" Caption="客户编号">
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn Name="t_MDayID" FieldName="MDayID" VisibleIndex="1" CellStyle-HorizontalAlign="Right"
                    ReadOnly="true" Caption="自动编码">
                    <PropertiesTextEdit Native="true" Width="260px">
                    </PropertiesTextEdit>
                    <EditFormSettings CaptionLocation="Near"></EditFormSettings>
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataDateColumn Name="t_MdayDate" FieldName="MdayDate" VisibleIndex="2"
                    CellStyle-HorizontalAlign="Center" Caption="纪念日日期">
                    <PropertiesDateEdit Width="260px">
                        <CalendarProperties TodayButtonText="今天" ClearButtonText="清除">
                        </CalendarProperties>
                        <ValidationSettings CausesValidation="true">
                            <RequiredField IsRequired="true" ErrorText="纪念日日期不可为空！"></RequiredField>
                        </ValidationSettings>
                    </PropertiesDateEdit>
                    <EditFormSettings CaptionLocation="Near"></EditFormSettings>
                </dx:GridViewDataDateColumn>
                <dx:GridViewDataMemoColumn Name="t_Remark" FieldName="Remark" VisibleIndex="3" CellStyle-HorizontalAlign="Left"
                    Caption="纪念日内容">
                    <PropertiesMemoEdit Width="300px" Height="100px">
                        <ValidationSettings CausesValidation="true">
                            <RequiredField IsRequired="true" ErrorText="纪念日内容不可为空！"></RequiredField>
                        </ValidationSettings>
                    </PropertiesMemoEdit>
                    <EditFormSettings CaptionLocation="Near"></EditFormSettings>
                </dx:GridViewDataMemoColumn>
                <dx:GridViewDataComboBoxColumn Name="t_IsToday" FieldName="IsToday" VisibleIndex="4"
                    CellStyle-HorizontalAlign="Left" Caption="当天祝福">
                    <PropertiesComboBox Width="260px">
                        <Items>
                            <dx:ListEditItem Text="否" Value="0" />
                            <dx:ListEditItem Text="是" Value="1" />
                        </Items>
                    </PropertiesComboBox>
                    <EditFormSettings CaptionLocation="Near"></EditFormSettings>
                </dx:GridViewDataComboBoxColumn>
                <dx:GridViewDataComboBoxColumn Name="t_SMSLibraryID" FieldName="SMSLibraryID" VisibleIndex="5"
                    CellStyle-HorizontalAlign="Left" Caption="祝福模版">
                    <PropertiesComboBox Width="260px" DataSourceID="SqlDataSourceMain" DropDownStyle="DropDownList"
                        TextFormatString="{0}" ValueType="System.Int32" ValueField="SMSLibraryID">
                        <Columns>
                            <dx:ListBoxColumn FieldName="SMSLibraryID" Caption="编码" />
                            <dx:ListBoxColumn FieldName="SMSContent" Caption="内容" Width="400px" />
                            <dx:ListBoxColumn FieldName="SMSClass" Caption="类型" />
                        </Columns>
                    </PropertiesComboBox>
                </dx:GridViewDataComboBoxColumn>
            </Columns>
            <StylesEditors ButtonEditCellSpacing="0">
                <ProgressBar Height="21px">
                </ProgressBar>
            </StylesEditors>
            <SettingsEditing EditFormColumnCount="1" />
        </dx:ASPxGridView>
        <dx:LinqServerModeDataSource ID="LSMDSourceMain" runat="server" EnableDelete="true"
            EnableUpdate="true" EnableInsert="true" ContextTypeName="DAL.CMSDALDataContext"
            TableName="BLI_Consumer_MDay" />
        <asp:SqlDataSource ID="SqlDataSourceMain" ConnectionString="<%$ ConnectionStrings:CMSConnectionString %>"
            SelectCommand="Select      SMSLibraryID,
                                       SMSContent,
		                               SMSClass = b.ClassName
                              from   BI_SMSLibrary a,
                                     BI_SMSClass b 
                              where  a.SMSClass_ID = b.ClassID " runat="server" ProviderName="<%$ ConnectionStrings:CMSConnectionString.ProviderName %>">
        </asp:SqlDataSource>
    </div>
</asp:Content>
